import { request } from '@/utils'

export function list(data) {
  return request({
    url: `opportunityManagement/selectPage`,
    method: 'post',
    data,
  })
}

export function info(params) {
  return request({
    url: `opportunityManagement/selectInfoById`,
    method: 'get',
    params,
  })
}

export function add(data) {
  return request({
    url: `opportunityManagement/add`,
    method: 'post',
    data,
  })
}

export function edit(data) {
  return request({
    url: `opportunityManagement/update`,
    method: 'put',
    data,
  })
}

export function del(params) {
  return request({
    url: `opportunityManagement/delete`,
    method: 'delete',
    params,
  })
}

export function businessAdd(data) {
  return request({
    url: `opportunityManagement/businessRecordsSubmit`,
    method: 'post',
    data,
  })
}

export function businessList(data) {
  return request({
    url: `opportunityManagement/selectBusinessRecordsPage`,
    method: 'post',
    data,
  })
}

export function durationAdd(data) {
  return request({
    url: `opportunityManagement/workingHoursRecordsSubmit`,
    method: 'post',
    data,
  })
}

export function durationList(data) {
  return request({
    url: `opportunityManagement/selectWorkingHoursPage`,
    method: 'post',
    data,
  })
}

export function demandAdd(data) {
  return request({
    url: `opportunityManagement/requirementRecordsSubmit`,
    method: 'post',
    data,
  })
}

export function demandList(data) {
  return request({
    url: `opportunityManagement/selectRequirementPage`,
    method: 'post',
    data,
  })
}

export function changeToProject(data) {
  return request({
    url: `opportunityManagement/changeToProject`,
    method: 'post',
    data,
  })
}
